Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4615 - Improve sanitization to allow virtualenv paths with () and [] characters to activate #4616

Merged
merged 3 commits into from
Mar 16, 2021

Conversation

leohku
Copy link

@leohku leohku commented Feb 7, 2021

The issue

Fixes #4615.
Related to #4538.

The fix

Added proper character escaping for () and [] characters in virtualenv paths, by modifying the regex in _get_activate_script() in pipenv/shells.py.

Also improved sanitization in _sanitize() of Project class in pipenv/project.py to turn () and [] characters into _.

These changes allows virtualenv paths with such characters to properly activate.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

news/4615.bugfix.rst Outdated Show resolved Hide resolved
pipenv/project.py Show resolved Hide resolved
@frostming frostming merged commit 275f7e1 into pypa:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parentheses escaping bug when running pipenv shell
4 participants